Screen Open 3,320,256,64,Lowres : Paper 0 : Curs Off : Cls 0 : Flash Off : Change Mouse 2
Screen Hide 3
Get Palette 1
Screen 0
Screen Copy 0 To 3
While Key State(20)
Wend
CONTELE:
Screen Copy 3 To 0
If TELE=0 Then Goto _NOTE
For A=1 To TELE
X1=TELE(A,1)*16+8
Y1=TELE(A,2)*16+8
X2=TELE(A,3)*16+8
Y2=TELE(A,4)*16+8
Ink 4
Draw X1,Y1 To X2,Y2
Circle X1,Y1,3
Next
_NOTE:
Repeat
If Key State(20)
Screen Close 3
While Key State(20)
Wend
RETRACE
Goto MAIN
End If
M=Mouse Key
X=X Screen(X Mouse)/16
Y=Y Screen(Y Mouse)/16
Until M<>0
'gauche:modif droit:cr�ation
NUM=-1
FOUND=0
For A=1 To TELE
If X=TELE(A,1) and Y=TELE(A,2) Then Inc FOUND : NUM=A
Next
If NUM=-1
If M=2
Goto CREAT
End If
Goto _NOTE
End If
ACT=0
RETRACE
Curs On
Locate 0,0 : Print "TELEPORT"
Curs Off
If TELE=0 Then Goto _NOTE2
For A=1 To TELE
If A=NUM Then Goto NON
X1=TELE(A,1)*16+8
Y1=TELE(A,2)*16+8
X2=TELE(A,3)*16+8
Y2=TELE(A,4)*16+8
Ink 4
Draw X1,Y1 To X2,Y2
Circle X1,Y1,3
NON:
Next
_NOTE2:
Screen Copy 0 To 3
X1=TELE(NUM,1)*16+8 : Rem on met en brillant ce que l'on modifie
Y1=TELE(NUM,2)*16+8
X2=TELE(NUM,3)*16+8
Y2=TELE(NUM,4)*16+8
_MODIF:
Rem act 0=Source, 2=Cible
While Mouse Key<>0
Wend
Screen Copy 0 To 3 : Rem Avec tous les traits
Repeat
If Key State(70) Then Goto DEL
Screen Copy 3 To 0
M=Mouse Key
If M=2
ACT=2-ACT
While Mouse Key
Wend
End If
X=X Screen(X Mouse)/16
Y=Y Screen(Y Mouse)/16
If ACT=0 Then X1=X*16+8 : Y1=Y*16+8 Else X2=X*16+8 : Y2=Y*16+8
Ink 7
Draw X1,Y1 To X2,Y2
Circle X1,Y1,3
Until M=1
TELE(NUM,1)=X1/16
TELE(NUM,2)=Y1/16
TELE(NUM,3)=X2/16
TELE(NUM,4)=Y2/16
While Mouse Key
Wend
Goto CONTELE
DEL:
Dec TELE
If NUM=TELE+1 Then Goto CONTELE
For A=NUM To TELE
For B=1 To 4
TELE(A,B)=TELE(A+1,B)
Next
Next
Goto CONTELE
CREAT:
Inc TELE
X1=X*16+8
Y1=Y*16+8
X2=8
Y2=8
ACT=2
TELE(TELE,1)=X1
TELE(TELE,2)=Y1
TELE(TELE,3)=X2
TELE(TELE,4)=Y2
NUM=TELE
Goto _MODIF
Procedure DK[ADR,V]
' Proc�dure qui sert � faire un DOKE sur une adresse impaire !
' PUTAIN D'AMOS DE MERDE !!!!
V1=V and $FF00
V2=V and $FF
Poke ADR,V1/256
Poke ADR+1,V2
End Proc
Procedure DEK[ADR]
' Proc�dure qui sert � faire un DEEK sur une adresse impaire !
' PUTAIN D'AMOS DE MERDE !!!!
' V=Deek(ADR)
' Pop Proc[V]
V1=Peek(ADR)
V2=Peek(ADR+1)
V=V1*256+V2
End Proc[V]
BONUS:
Data '"Rien"'
Data "Flamme","Bombe","Pousse Bombe","Maladie inversion"
Data "Maladie ptt flammes","Maladie time bombe fast","Maladie speed slow","Maladie speed fast","Maladie time bomb slow","Maladie camembert","maladie gele bombes","maladie grd flammes"
Data "maladie plus de bombes","maladie +10 bombes","maladie goutte d'eau","trousse de secours","horloge","Bombe rebond","Bombes folles"
Data "+5 bombes","+10 flammes","Cadeau","maladie collique"
Data "***"
'Screen 3 : Get Palette 0
Screen Open 0,640,512,8,Hires+Laced : Paper 0 : Curs Off : Cls 0 : Flash Off : Hide On
Pen 4
Locate 5,0 : Print "Autorisation des bonus pour le niveau"
Restore BONUS
Y=0
Pen 2
Do
Read A$
If A$="***" Then Exit
Inc Y
A$(Y)=A$
Locate 0,Y : Print A$
Loop
Colour 5,$F0F
Colour 7,$222
Y=1
RET:
Ink 4
Gosub CALC
Gosub ALL
T=Y
M=1
Gosub TRACE
' Attente rel�chement fl�ches ou appui sur shift
While(Key State(76) or Key State(77)) and Not(Key State(96) or Key State(97))
Wend
Do
If Key State(53)
Screen Open 0,320,256,64,Lowres : Paper 0 : Curs Off : Cls 0 : Flash Off : Show On : Change Mouse 2
Get Palette 1
'Get Palette 3
RETRACE
While Key State(53)
Wend
Goto MAIN
End If
If Key State(19)
For A=1 To 30
BONUS(A)=BONUS2(A)
Next
Goto RET
End If
DY=Key State(76)-Key State(77)
If DY<>0
If Y+DY>=1 and Y+DY<=30
Pen 2 : Paper 0
Locate 0,Y
Print A$(Y)
Add Y,DY
Pen 0 : Paper 2
Locate 0,Y
Print A$(Y)
Goto RET
End If
End If
DX=Key State(79)-Key State(78)
If DX<>0
If BONUS(Y)+DX>=0 and BONUS(Y)+DX<=200
Add BONUS(Y),DX
Gosub CALC
Gosub ALL
T=Y
M=1
Gosub TRACE
Wait Vbl
End If
End If
Loop
ALL:
For A=1 To 30
T=A
M=0
If A<>Y
Gosub TRACE
End If
Next
Return
TRACE:
Pen 2 : Paper 0
'T: Position Y
YS=T*8
XS=200
P=PS(T)
If M=1 Then Ink 5 Else Ink 4
If P>1 Then Bar XS,YS To XS+P,YS+7 Else Box XS,YS To XS+P,YS+7
If M=1 Then Ink 7 Else Ink 0
If P<99 Then Bar XS+P+1,YS To XS+100,YS+7 Else Box XS+P+1,YS To XS+100,YS+7
Locate 40,T : Print BONUS(T);" "
Locate 45,T : Print POUR(T);" % "
Pen 4
Locate 40,32 : Print TT
Return
CALC:
TT=0
MA=0
For A=1 To 30
Add TT,BONUS(A)
If BONUS(A)>MA Then MA=BONUS(A)
Next
For A=1 To 30
If TT=0
POUR(A)=0
PS(A)=0
Else
POUR(A)=(BONUS(A)*100)/TT
PS(A)=(BONUS(A)*100)/MA
End If
Next
Return
POSEBONUS:
Screen To Front 4 : Screen Show 4 : Screen 4
While Mouse Key
Wend
Repeat
X=X Screen(X Mouse)/16
M=Mouse Key
If M=2 Then Screen Hide 4 : Goto MAIN
Until(M=1 and X>=0 and X<NBBONUS)
C=RBONUS(X+1)
If C=0 Then Goto POSEBONUS
CHOIX=C+64 : Rem <-- d�calage pour les bonus
N=NBONUS(X+1)
_GETBL[N]
Screen Hide 4
Goto MAIN
REGLAGES:
Screen Open 0,640,256,8,Hires : Paper 0 : Curs Off : Cls 0 : Flash Off : Hide On